<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>学生信息</title>
    <link rel="stylesheet" href="/css/layui.css">
    <link rel="stylesheet" href="/css/firstdp.css">
    <script src="/js/jquery-3.7.1.min.js"></script>
</head>
<body>
<div class="container">

    <div class="latui-row">
        <div class="layui-col-xs12">
            <h1 style="text-align: center">
                学生信息管理
            </h1>
        </div>
    </div>


    <div class="latui-row">
        <div class="layui-col-xs12 toolbar">
            <!--    第一行，添加和删除按钮-->
            <div class="layui-row">
<!--                新增-->
                <button type="button" class="layui-btn layui-btn-sm layui-btn-normal" onclick="showStudentDlg();return false;">
                    <i class="layui-icon layui-icon-addition"></i>
                </button>
<!--                删除-->
                <button type="button" class="layui-btn layui-btn-sm layui-btn-normal layui-bg-red"
                        onclick="deleteConfirm();" style="float:right;">
                    <i class="layui-icon layui-icon-delete"></i>
                </button>

            </div>
            <!--    第二行，输入查询-->
            <div class="queryBox">
                <form action="" class="layui-form" id="queryForm">
                    <ul class="query-inline">
                        <li class="layui-input-group">
                            <div class="layui-input-prefix">
                                学号
                            </div>
                            <input type="text" placeholder="学号" class="layui-input" name="sno">
                        </li>
                        <li class="layui-input-group">
                            <div class="layui-input-prefix">
                                姓名
                            </div>
                            <input type="text" placeholder="姓名" class="layui-input" name="name">

                        </li>
                        <li class="layui-input-group">
                            <div class="layui-input-prefix">
                                年龄
                            </div>
                            <input type="number" placeholder="年龄" class="layui-input" name="age">
                        </li>
                        <li class="layui-input-group">
                            <div class="layui-input-prefix">
                                性别：
                            </div>
                            <select name="sex">
                                <option value="">请选择</option>
                                <option value="2">男</option>
                                <option value="1">女</option>
                            </select>
                        </li>
                        <li class="layui-input-group">
                            <button type="button" class="layui-btn layui-btn-normal"
                                    onclick="search(); return false;" style="margin-left: 20px;">
                                查询
                            </button>
                        </li>
                    </ul>
                </form>
            </div>

        </div>
    </div>

<!--    第三行，表格-->
    <div class="layui-row">
        <div class="layui-col-xs12">
            <table class="layui-hide" id="tbStudent" lay-filter="tbStudent"></table>
        </div>
    </div>

    <script type="text/html" id="editTemplate">
        <div class="layui-clear-space">
            <a class="layui-btn layui-btn-xs" lay-event="edit">
            编辑
            </a>
        </div>
    </script>
    <button type="button" class="layui-btn layui-btn-normal layui-btn-radius"
            onclick="showDown();return false;" style="float:right;margin-top: 5px;">正序</button>
    <button type="button" class="layui-btn layui-btn-normal layui-btn-radius"
            onclick="showUp();return false;" style="float:right;margin-right: 10px;margin-top: 5px;">倒序</button>
</div>

<!--&lt;!&ndash;原来的查询&ndash;&gt;-->
<!--<div class="layui-form-item" id="select">-->
<!--    <div class="layui-input-group">-->
<!--&lt;!&ndash;        <div class="layui-input-prefix">&ndash;&gt;-->
<!--&lt;!&ndash;            输入姓名查询：&ndash;&gt;-->
<!--&lt;!&ndash;        </div>&ndash;&gt;-->
<!--        <div class="layui-form">-->
<!--            <select lay-filter="demo-select-filter" id="style">-->
<!--                <option value="">请选择查询方式</option>-->
<!--                <option value="AAA">按姓名查询</option>-->
<!--                <option value="BBB">按学号查询</option>-->
<!--                <option value="CCC">按年龄查询</option>-->
<!--            </select>-->
<!--        </div>-->
<!--        <input type="text" placeholder="name" class="layui-input" id="input">-->
<!--        <div class="layui-input-split layui-input-suffix" style="cursor: pointer;" id="search">-->
<!--            <i class="layui-icon layui-icon-search"></i>-->
<!--        </div>-->
<!--    </div>-->
<!--</div>-->

<!--&lt;!&ndash;原来显示查询结果的部分&ndash;&gt;-->
<!--<div class="container">-->
<!--    <div class="layui-row">-->
<!--        <div class="layui-col-xs12">-->
<!--            <table  class="layui-table" lay-even>-->

<!--                <thead id="tableHead"></thead>-->
<!--                <tbody id="studentByName"></tbody>-->

<!--            </table>-->
<!--        </div>-->
<!--    </div>-->
<!--</div>-->



<form class="layui-form dlgcontainer" id="studForm" style="display: none;">
    <div class="demo-reg-container">
        <div class="layui-form-item" id="formId">
            <div class="layui-row">
                <div class="layui-col-xs12">
                    <label class="layui-form-label head-label">id</label>
                    <div class="layui-input-block ">
<!--                        <div class="layui-input-prefix">-->
<!--                            <i class="layui-icon layui-icon-cellphone"></i>-->
<!--                        </div>-->
                        <input type="text" name="id" value="" placeholder="id" lay-reqtext="请填写id" autocomplete="off" class="layui-input body-label" id="id">
                    </div>
                </div>

            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label head-label">学号</label>
            <div class="layui-input-block">
<!--                <div class="layui-input-prefix">-->
<!--                    <i class="layui-icon layui-icon-vercode"></i>-->
<!--                </div>-->
                <input type="text" name="sno" value="" lay-verify="required" placeholder="sno" lay-reqtext="请填写学号" autocomplete="off" class="layui-input body-label">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label head-label">姓名</label>
            <div class="layui-input-block">
<!--                <div class="layui-input-prefix">-->
<!--                    <i class="layui-icon layui-icon-username"></i>-->
<!--                </div>-->
                <input type="text" name="name" value="" lay-verify="required" placeholder="name" autocomplete="off" class="layui-input body-label" id="name">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label head-label">年龄</label>
            <div class="layui-input-block">
<!--                <div class="layui-input-prefix">-->
<!--                    <i class="layui-icon layui-icon-tree"></i>-->
<!--                </div>-->
                <input type="text" name="age" value="" placeholder="age" autocomplete="off" class="layui-input body-label" lay-affix="clear">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label head-label">密码</label>
            <div class="layui-input-block">
<!--                <div class="layui-input-prefix">-->
<!--                    <i class="layui-icon layui-icon-password"></i>-->
<!--                </div>-->
                <input type="text" name="password" value="" lay-verify="required" placeholder="password" autocomplete="off" class="layui-input body-label" id="password">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-wrap">
                <label class="layui-form-label head-label">性别</label>
                <div class="layui-input-block">
                    <input type="radio" name="sex" value="2" title="男" checked>
                    <input type="radio" name="sex" value="1" title="女">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <button class="layui-btn layui-btn-fluid" lay-submit lay-filter="stud-dlg" id="btnOK">确定</button>
        </div>
    </div>
</form>



<script src="/js/layui.js"></script>
<script src="/js/pagejs/firstdpStudent.js"></script>
</body>
</html>